{% extends "./tmplinfo.html" %}
{% block head %}
<script>
    $().ready(function () {
        $("#form_add_info").validate(
                {
                    submitHandler: function (form) {
                        form.submit();
                    }
                }
        );
    });
</script>
{% end %}
{% block typebody %}
<ol class="breadcrumb">
    <li>{{ _('Current location') }}: <a href="{% module site_url() %}">{{ _('Home') }}</a></li>

    <li class="active"> {{ _('Publish Info') }}
    </li>
</ol>
<div class="panel panel-black" id="guarantee">
    <div class="panel-heading">
        <div class="row">
            <div class="col-sm-3">{{ _('Publish Info') }}</div>
            <div class="col-sm-9"> {% module BreadcrumbPublish(2) %}</div>
        </div>
    </div>
    <div class="panel-body">
        <form class="form-horizontal" role="form" id="form_add_info" name="form_add_info" method="post"
              enctype="multipart/form-data">
            <input type='hidden' name="uid" value="{% raw kwd['uid'] %}">
            <input type='hidden' name="gcat0" value="{% raw kwd['gcat0'] %}">
            <input name="action" value="dopost" type="hidden">
            <input name="ismember" value="0" type="hidden">
            <input name="id" value="" type="hidden">
            <input name="mixcode" value="4c9734774f6b40682d35c0ccee0b0845" type="hidden">

            <div class="form-group">
                <label class="col-sm-2 control-label"> </label>

                <div class="col-sm-10">
                    <b> {{ _('Basic data information') }} : {{ kwd['parentname'] }} > {{ kwd['catname'] }}</b>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">
                    <a class="glyphicon glyphicon-star" style="color: red;font-size: xx-small;"></a>
                    {{ _('Title') }}
                </label>

                <div class="col-sm-10">
                    <input type="text" class="form-control" name="title" id="title" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">
                    <a class="glyphicon glyphicon-star" style="color: red;font-size: xx-small;"></a>
                    {{ _('Label') }}
                </label>

                <div class="col-sm-10">
                    <input id="tags" name="tags" class="form-control" onchange="chuli_kw()">
                            <br>
                            <div id="kwlist"></div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="order">{{ _('order') }}</label>

                <div class="col-sm-10">
                    <input class="form-control" id="order" name="order" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="logo">{{ _('Picture') }}</label>

                <div class="col-sm-10">


                    <input type="text" id="logo" name="logo" class="form-control" readonly/>

                    <br>

                    <a class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal">
                        {{ _('Upload picture') }}
                    </a>


                </div>
            </div>



             <div class="form-group">
                <label class="col-sm-2 control-label" for="logo">{{ _('File') }}</label>

                <div class="col-sm-10">


                    <input type="text" id="ext_file" name="ext_file" class="form-control" readonly/>

                    <br>

                    <a class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal_file">
                        {{ _('Upload File') }}
                    </a>


                </div>
            </div>



            <div class="form-group">
                <label class="col-sm-2 control-label">
                    <a class="glyphicon glyphicon-star" style="color: red;font-size: xx-small;"></a>
                    {{ _('Content') }}（Markdown）
                </label>

                <div class="col-sm-10">
                    <textarea class="form-control" rows=26 id="cnt_md" name="cnt_md"></textarea>
                </div>
            </div>
            <hr/>
            {% block extrainfo %}{% end %}
            <div class="form-group">
                <label class="col-sm-2 control-label"> </label>

                <div class="col-sm-10">
                    <input type="submit" name="post_submit" value="{{ _('Submit') }}" id="Button1"
                           class="btn btn-primary" role="button"/>
                </div>
            </div>
        </form>
        {% module upload_pic() %}
        {% module upload_file() %}
    </div>
</div>

{% end %}
